#include <iostream>
using namespace std;

enum class Suit { club, diamond, heart, spade, };

enum class Rank {
    two = 2,
    three, four, five, six, seven, eight, nine, ten,
    jack, queen, king, ace,
};

class Card {
private:
    Suit suit;
    Rank rank;

public:
    Card();
    void SetSuit(Suit suit) { this->suit = suit; }
    void SetRank(Rank rank) { this->rank = rank; }
    void ShowCard();
};

int main() {
    Card card[52];

    for (int i = 0, k = 0; i < 4; i++) {
        for (int j = 2; j < 15; j++, k++) {
            card[k].SetSuit(Suit(i));
            card[k].SetRank(Rank(j));
        }
    }

    for (int i = 0; i < 52; i++) {
        card[i].ShowCard();
        if (i % 13 == 12) {
            cout << "\n";
        }
    }
}

Card::Card() {
    cout << "构造函数\n";
    suit = Suit::club;
    rank = Rank::two;
}

void Card::ShowCard() {
    switch (suit) {
        case Suit::spade:
            cout << " ♠";
            break;
        case Suit::heart:
            cout << " ♥";
            break;
        case Suit::diamond:
            cout << " ♦";
            break;
        case Suit::club:
            cout << " ♣";
            break;
    }
    if (int(rank) < 11) {
        cout << int(rank);
    }
    else if (rank == Rank::jack) {
        cout << "J";
    }
    else if (rank == Rank::queen) {
        cout << "Q";
    }
    else if (rank == Rank::king) {
        cout << "K";
    }
    else {
        cout << "A";
    }
}